import http from '@/api/http'


const LOADING = {
    loading: true
}

/**
 * 服务事件单列表
 */
export const serviceCases = (data = {}) => http.post(`${process.env.VUE_APP_CTX_ORDER_QUERY}/qryEventListDetail`, data, LOADING)
/**
 * 新增 回单 退单 评价
 */
export const addEvent = (data = {}) => http.post(`${process.env.VUE_APP_CTX_ORDER_QUERY}/addEvent`, data, {
    ...LOADING,
    headers: {
        'Content-Type': 'multipart/form-data'
    }
})
/**
 * 服务事件处理进度查询
 */
 export const qryEventListProgress = (data = {}) => http.post(`${process.env.VUE_APP_CTX_ORDER_QUERY}/qryEventListProgress`, data, {
    ...LOADING,
    headers: {
        'Content-Type': 'multipart/form-data'
    }
})
/**
 * 下载
 */
 export const downEventFile = (data = {}) => http.post(`${process.env.VUE_APP_CTX_ORDER_QUERY}/downEventFile`, data, {
    ...LOADING,
    headers: {
        'Content-Type': 'application/json'
    },
    responseType: 'blob',
})

/**
 * 客户工程师
 */
 export const custEnginer = (data = {}) => http.post(`${process.env.VUE_APP_CTX_ORDER_QUERY}/selectableCustomeServiceEvent`, data, LOADING)
